package org.gy.T9.OutputStream;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class Test2ObjectInputStream {
    public static void main(String[] args) {
        try (
// 1、创建⼀个对象字节输⼊流管道，包装 低级的字节输⼊流与源⽂件接通
                ObjectInputStream ois = new ObjectInputStream(new
                        FileInputStream("C:/file-io-app2/src/itheima11out.txt"));
        ){
            User u = (User) ois.readObject();
            System.out.println(u);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
